From fc08c159e2c0d570da307029cbc43660c86da1f5 Mon Sep 17 00:00:00 2001
From: Christoph Berg <myon@debian.org>
Date: Mon, 12 Oct 2026 15:14:39 +0200
Subject: [PATCH v13 1/3] Contributor copy-editing

Apply finding from Daniel's review:

* retired badge holders have a CSS class
* contribution field description is "Describe your involvement in the
  PostgreSQL community"
* The logo is the PostgreSQL logo
* Badge images have an alt title
* "Create contributor profile" checkbox has a proper id and label
---
 media/css/main.css                                          | 3 +++
 pgweb/contributors/migrations/0001_initial.py               | 2 +-
 ...er_contributor_ctype_alter_contributor_email_and_more.py | 2 +-
 pgweb/contributors/models.py                                | 4 ++--
 templates/account/userprofileform.html                      | 4 ++--
 templates/contributors/badge.html                           | 6 +++---
 templates/contributors/people.html                          | 2 +-
 templates/contributors/profile.html                         | 4 ++--
 8 files changed, 15 insertions(+), 12 deletions(-)

diff --git a/media/css/main.css b/media/css/main.css
index 9c4e24d8..a41632d2 100644
--- a/media/css/main.css
+++ b/media/css/main.css
@@ -1758,6 +1758,9 @@ table.contributor-table thead tr th {
   text-align: center;
   padding: 4px;
 }
+.badgeholder-retired {
+  font-style: italic;
+}
 
 /* News archive */
 #pgContentWrap span.newstag {
diff --git a/pgweb/contributors/migrations/0001_initial.py b/pgweb/contributors/migrations/0001_initial.py
index 244e2e49..e2121892 100644
--- a/pgweb/contributors/migrations/0001_initial.py
+++ b/pgweb/contributors/migrations/0001_initial.py
@@ -22,7 +22,7 @@ class Migration(migrations.Migration):
                 ('company', models.CharField(max_length=100, null=True, blank=True)),
                 ('companyurl', models.URLField(max_length=100, null=True, verbose_name='Company URL', blank=True)),
                 ('location', models.CharField(max_length=100, null=True, blank=True)),
-                ('contribution', models.TextField(null=True, blank=True, help_text='Describe what you did in the PostgreSQL community')),
+                ('contribution', models.TextField(null=True, blank=True, help_text='Describe your involvement in the PostgreSQL community')),
             ],
             options={
                 'ordering': ('lastname', 'firstname'),
diff --git a/pgweb/contributors/migrations/0005_alter_contributor_ctype_alter_contributor_email_and_more.py b/pgweb/contributors/migrations/0005_alter_contributor_ctype_alter_contributor_email_and_more.py
index 75b002aa..87627ccb 100644
--- a/pgweb/contributors/migrations/0005_alter_contributor_ctype_alter_contributor_email_and_more.py
+++ b/pgweb/contributors/migrations/0005_alter_contributor_ctype_alter_contributor_email_and_more.py
@@ -82,7 +82,7 @@ class Migration(migrations.Migration):
                     "imagedata",
                     pgweb.util.fields.ImageBinaryField(
                         blank=True,
-                        help_text="Square image, will be auto-scaled to 150×150. JPEG or PNG, up to 1 MB. When left blank, the Slony logo will be used.",
+                        help_text="Square image, will be auto-scaled to 150×150. JPEG or PNG, up to 1 MB. When left blank, the PostgreSQL logo will be used.",
                         max_length=1000000,
                         null=True,
                         verbose_name="Image",
diff --git a/pgweb/contributors/models.py b/pgweb/contributors/models.py
index 7ffc0881..7d55a0dc 100644
--- a/pgweb/contributors/models.py
+++ b/pgweb/contributors/models.py
@@ -53,7 +53,7 @@ class Contributor(models.Model):
     companyurl = models.URLField(max_length=100, null=True, blank=True, verbose_name='Company URL')
     location = models.CharField(max_length=100, null=True, blank=True)
     contribution = models.TextField(null=True, blank=True,
-                                    help_text='Describe what you did in the PostgreSQL community')
+                                    help_text='Describe your involvement in the PostgreSQL community')
     user = models.OneToOneField(User, null=True, blank=True, on_delete=models.CASCADE)
 
     send_notification = True
@@ -102,7 +102,7 @@ class Badge(TwostateModerateModel):
     slug = models.SlugField(max_length=64, null=False, blank=False, unique=True, help_text='URL-friendly identifier for the badge page. Generated from the title when the badge is created, and kept fixed after that.')
     description = models.TextField(null=True, blank=True, help_text='What did the people do who contributed here?')
     url = models.URLField(max_length=100, null=True, blank=True, verbose_name='Contribution URL', help_text='URL for this contribution, e.g. the conference homepage. (Leave blank when there is no URL.)')
-    imagedata = ImageBinaryField(max_length=1000000, resolution=(150, 150), auto_scale=True, blank=True, null=True, verbose_name="Image", help_text="Square image, will be auto-scaled to 150×150. JPEG or PNG, up to 1 MB. When left blank, the Slony logo will be used.")
+    imagedata = ImageBinaryField(max_length=1000000, resolution=(150, 150), auto_scale=True, blank=True, null=True, verbose_name="Image", help_text="Square image, will be auto-scaled to 150×150. JPEG or PNG, up to 1 MB. When left blank, the PostgreSQL logo will be used.")
     contact = models.CharField(max_length=100, null=True, blank=True, verbose_name='Contact address', help_text='Contact address (email, URL, other) for people who want to be added as badge holder')
     holders = models.ManyToManyField(User, through="Badgeholder", through_fields=("badge", "user"), blank=True)
 
diff --git a/templates/account/userprofileform.html b/templates/account/userprofileform.html
index bac04651..01fba575 100644
--- a/templates/account/userprofileform.html
+++ b/templates/account/userprofileform.html
@@ -100,7 +100,7 @@
     {%for b in badges %}
       <figure>
         <a href="/community/badge/{{b.slug}}/">
-        <img src="{%if b.has_image %}/community/badge/{{b.slug}}/image/{%else%}/media/img/about/press/elephant.png{%endif%}">
+        <img src="{%if b.has_image %}/community/badge/{{b.slug}}/image/{%else%}/media/img/about/press/elephant.png{%endif%}" alt="{{b}}">
         <figcaption>{{b}}</figcaption>
         </a>
       </figure>
@@ -134,7 +134,7 @@
     <h2>Create contributor profile</h2>
     <p>You have been awarded contributor badges. To have your name included in the public people and badge holder lists, you can create a publicly visible profile page.</p>
     <div>
-      <input type="checkbox" name="create_contributor_profile"> Create publicly visible profile page
+      <input type="checkbox" name="create_contributor_profile" id="create_contributor_profile"> <label for="create_contributor_profile">Create publicly visible profile page</label>
     </div>
   {% endif %}
 
diff --git a/templates/contributors/badge.html b/templates/contributors/badge.html
index 1da8f84b..7ea0f1fd 100644
--- a/templates/contributors/badge.html
+++ b/templates/contributors/badge.html
@@ -3,7 +3,7 @@
 {%block title%}{{badge}} - Contribution{%endblock%}
 {%block contents%}
 <h1>Badge: {{badge}} <i class="fa fa-star"></i></h1>
-<p><img src="{%if badge.has_image %}/community/badge/{{badge.slug}}/image/{%else%}/media/img/about/press/elephant.png{%endif%}" width="150"></p>
+<p><img src="{%if badge.has_image %}/community/badge/{{badge.slug}}/image/{%else%}/media/img/about/press/elephant.png{%endif%}" width="150" alt="{{badge}}"></p>
 
 {% if badge.description or badge.url %}
 <h2>Contribution</h2>
@@ -19,12 +19,12 @@
 <h2>Badge Holders</h2>
   {%if holders|length > 50%}
     {%for u in holders.all %}
-      <nobr>{%if u.date_retired%}<em>{%endif%}<a href="/community/people/{{u.user}}/">{{u.user.contributor.firstname}} {{u.user.contributor.lastname}}</a>{%if u.date_retired%}</em>{%endif%} {%if not forloop.last%}&middot;{%endif%}</nobr>
+      <nobr{%if u.date_retired%} class="badgeholder-retired"{%endif%}><a href="/community/people/{{u.user}}/">{{u.user.contributor.firstname}} {{u.user.contributor.lastname}}</a> {%if not forloop.last%}&middot;{%endif%}</nobr>
     {%endfor%}
   {%else%}
     <ul>
       {%for u in holders.all%}
-        <li>{%if u.date_retired%}<em>{%endif%}<a href="/community/people/{{u.user}}/">{{u.user.contributor.firstname}} {{u.user.contributor.lastname}}</a>{%if u.date_retired%} (retired from this activity)</em>{%endif%}</li>
+        <li{%if u.date_retired%} class="badgeholder-retired"{%endif%}><a href="/community/people/{{u.user}}/">{{u.user.contributor.firstname}} {{u.user.contributor.lastname}}</a>{%if u.date_retired%} (retired from this activity){%endif%}</li>
       {%endfor%}
     </ul>
   {%endif%}
diff --git a/templates/contributors/people.html b/templates/contributors/people.html
index 67de9b9d..37211902 100644
--- a/templates/contributors/people.html
+++ b/templates/contributors/people.html
@@ -26,7 +26,7 @@
 {%for b in badges %}
     <figure>
         <a href="/community/badge/{{b.slug}}/">
-        <img src="{%if b.has_image %}/community/badge/{{b.slug}}/image/{%else%}/media/img/about/press/elephant.png{%endif%}">
+        <img src="{%if b.has_image %}/community/badge/{{b.slug}}/image/{%else%}/media/img/about/press/elephant.png{%endif%}" alt="{{b}}">
         <figcaption>{{b}}</figcaption>
         </a>
     </figure>
diff --git a/templates/contributors/profile.html b/templates/contributors/profile.html
index f4d1afdc..e47bf455 100644
--- a/templates/contributors/profile.html
+++ b/templates/contributors/profile.html
@@ -12,8 +12,8 @@
       {%for b in badges %}
         <figure>
           <a href="/community/badge/{{b.badge.slug}}/">
-          <img src="{%if b.badge.has_image %}/community/badge/{{b.badge.slug}}/image/{%else%}/media/img/about/press/elephant.png{%endif%}">
-          <figcaption>{{b.badge}}{%if b.date_retired%}<br><em>(retired)</em>{%endif%}</figcaption>
+          <img src="{%if b.badge.has_image %}/community/badge/{{b.badge.slug}}/image/{%else%}/media/img/about/press/elephant.png{%endif%}" alt="{{b.badge}}">
+          <figcaption{%if b.date_retired%} class="badgeholder-retired"{%endif%}>{{b.badge}}{%if b.date_retired%}<br>(retired){%endif%}</figcaption>
           </a>
         </figure>
       {%endfor%}
-- 
2.53.0

